INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_G_WRAP_GSL g_wrap_gsl)

FIND_PATH(
    G_WRAP_GSL_INCLUDE_DIRS
    NAMES g_wrap_gsl/api.h
    HINTS $ENV{G_WRAP_GSL_DIR}/include
        ${PC_G_WRAP_GSL_INCLUDEDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/include
          /usr/local/include
          /usr/include
)

FIND_LIBRARY(
    G_WRAP_GSL_LIBRARIES
    NAMES gnuradio-g_wrap_gsl
    HINTS $ENV{G_WRAP_GSL_DIR}/lib
        ${PC_G_WRAP_GSL_LIBDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/lib
          ${CMAKE_INSTALL_PREFIX}/lib64
          /usr/local/lib
          /usr/local/lib64
          /usr/lib
          /usr/lib64
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(G_WRAP_GSL DEFAULT_MSG G_WRAP_GSL_LIBRARIES G_WRAP_GSL_INCLUDE_DIRS)
MARK_AS_ADVANCED(G_WRAP_GSL_LIBRARIES G_WRAP_GSL_INCLUDE_DIRS)

